// import Vue from 'vue'
// import VueRouter from 'vue-router'
// import login from '../components/login'
// import register from '../components/register'
// import miss from '../components/missCode'
// import NewDetail from "../views/newdetail/components/Detail";
// import Search from "../views/Search";

// Vue.use(VueRouter)

// const routes = [
//   {
//     path: '/login',
//     component: login
//   },
//   {
//     path: '/register',
//     component: register
//   },
//   {
//     path: '/miss',
//     component: miss
//   },
//   {
//     path: '/detail',
//     component: NewDetail,
//   },
//   //  搜索
//   {
//     path: '/search',
//     component: Search,
//   },

//   {
//     path: '/',
//     redirect: "layout/Firstpage",
//     name: 'Firstpage',
//   },
//   {
//     path: '/layout',
//     component: () => import('../Layout/layout'),
//     children: [
//       {
//         path: 'Firstpage',
//         component: () => import('../views/Firstpage.vue')
//       },
//       {
//         path: 'msg',
//         component: () => import('../views/msg/Msg')
//       },
//       {
//         path: 'Mine',
//         component: () => import('../views/Mine')
//       },
//       {
//         path: 'personalMsg',
//         component: () => import('../components/personalMsg')
//       },
//       {
//         path: 'resetPerMsg',
//         component: () => import('../components/resetPerMsg')
//       },
//       {
//         path: 'collect',
//         component: () => import('../components/collect')
//       },
    
//     ]
//   },
//   {
//     path: "/Topnav",
//     component: () => import('../components/Topnav')
//   },
//   {
//     path: "/Pagebox",
//     component: () => import('../components/Pagebox')
//   }

// ]
// const router = new VueRouter({
//   mode: 'history',
//   base: process.env.BASE_URL,
//   routes
// })

// export default router



/////////////
import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../components/login'
import register from '../components/register'
import miss from '../components/missCode'
import NewDetail from "../views/newdetail/components/Detail";
import Search from "../views/Search";
import Firstpage from "../views/Firstpage";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('../components/Cover')
  },
  {
    path: '/firstpage',
    component: Firstpage,
    name: 'Firstpage',
  },
  {
    path: '/login',
    component: login
  },
  {
    path: '/register',
    component: register,
  },
  {
    path: '/miss',
    component: miss
  },
  {
    path: '/detail',
    component: NewDetail,
  },
  //  搜索
  {
    path: '/search',
    component: Search,
  },


  {
    path: '/layout',
    component: () => import('../Layout/layout'),
    children: [
      {
        path: 'Firstpage',
        component: () => import('../views/Firstpage.vue')
      },
      {
        path: 'msg',
        component: () => import('../views/msg/Msg')
      },
      {
        path: 'Mine',
        component: () => import('../views/Mine')
      },
      {
        path: 'personalMsg',
        component: () => import('../components/personalMsg')
      },
      {
        path: 'resetPerMsg',
        component: () => import('../components/resetPerMsg')
      },
      {
        path: 'collect',
        component: () => import('../components/collect')
      },
    
    ]
  },
  {
    path: "/Topnav",
    component: () => import('../components/Topnav')
  },
  {
    path: "/Pagebox",
    component: () => import('../components/Pagebox')
  }

]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
